<?php

declare(strict_types=1);

namespace app\common\model\hrm;

use think\Model;
use app\common\traits\ModelTrait;

/**
 * 部门表-模型
 * @author kaige
 * @date 2022-06-17
 * @copyright ©2022 泉州市盛筑信息科技有限公司 版权所有
 */
class HrmDept extends Model
{
    //开启自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';
    protected $updateTime = null;

    // 设置字段信息(避免多一次查询的开销)
    protected $schema = [
        'id'            => 'int',
        'pid'           => 'int',
        'name'          => 'string',
        'sort'          => 'int',
        'code'          => 'string',
        'extend'        => 'int',
        'status'        => 'int',
        'headman'       => 'string',
        'headid'        => 'int',
        'company_id'    => 'int',
        'create_time'   => 'int'
    ];

    use ModelTrait;
}
